package com.ssm.pre.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ssm.pre.service.WechatAppService;
import com.ssm.util.object.InputObject;
import com.ssm.util.object.OutputObject;

/**
 * 查询公众号的一些配置信息
 * @author mps
 *
 */
@Controller
public class WechatAppController {

	@Autowired
	private WechatAppService wechatAppService;
	
	/**
	 * 添加微信公众号的配置信息
	 * @param inputObject
	 * @param outputObject
	 * @throws Exception
	 */
	@RequestMapping("/post/WechatAppController/addWechatAppInfo")
	@ResponseBody
	public void addWechatAppInfo(InputObject inputObject, OutputObject outputObject)throws Exception{
		wechatAppService.addWechatAppInfo(inputObject, outputObject);
	}
	
	/**
	 * 根据ID删除微信公众号的配置信息
	 * @param inputObject
	 * @param outputObject
	 * @throws Exception
	 */
	@RequestMapping("/post/WechatAppController/deleteWechatAppById")
	@ResponseBody
	public void deleteWechatAppById(InputObject inputObject, OutputObject outputObject)throws Exception{
		wechatAppService.deleteWechatAppById(inputObject, outputObject);
	}
	
	/**
	 * 查询所有的微信公众号配置信息
	 * @param inputObject
	 * @param outputObject
	 * @throws Exception
	 */
	@RequestMapping("/post/WechatAppController/queryWechatAppByList")
	@ResponseBody
	public void queryWechatAppByList(InputObject inputObject, OutputObject outputObject)throws Exception{
		wechatAppService.queryWechatAppByList(inputObject, outputObject);
	}
	
	/**
	 * 根据ID查询一条记录
	 * @param inputObject
	 * @param outputObject
	 * @throws Exception
	 */
	@RequestMapping("/post/WechatAppController/queryWechatAppById")
	@ResponseBody
	public void queryWechatAppById(InputObject inputObject, OutputObject outputObject)throws Exception{
		wechatAppService.queryWechatAppById(inputObject, outputObject);
	}
	
	/**
	 * 根据ID修改一条记录
	 * @param inputObject
	 * @param outputObject
	 * @throws Exception
	 */
	@RequestMapping("/post/WechatAppController/updateWechatAppById")
	@ResponseBody
	public void updateWechatAppById(InputObject inputObject, OutputObject outputObject)throws Exception{
		wechatAppService.updateWechatAppById(inputObject, outputObject);
	}
}
